/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modelo;

import java.io.Serializable;
import javax.persistence.AssociationOverride;
import javax.persistence.AssociationOverrides;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.Table;

/**
 *
 * @author Elias Mendoza
 */
@Entity
@Table(name="grupo_lectura")
@AssociationOverrides({
		@AssociationOverride(name = "primaryKey.grupoFK", 
			joinColumns = @JoinColumn(name = "grupo_id",referencedColumnName="id")),
		@AssociationOverride(name = "primaryKey.lecturaFK", 
			joinColumns = @JoinColumn(name = "lectura_id",referencedColumnName="id")) })
public class GrupoLectura implements Serializable{
  @EmbeddedId
  private GrupoLecturaPK primaryKey;
  @JoinColumn(name="estado",nullable=false)
  private int estadoValvula;

  public GrupoLectura() {
  }

  
  public int getEstadoValvula() {
    return estadoValvula;
  }

  public void setEstadoValvula(int estadoValvula) {
    this.estadoValvula = estadoValvula;
  }

  public GrupoLecturaPK getPrimaryKey() {
    return primaryKey;
  }

  public void setPrimaryKey(GrupoLecturaPK primaryKey) {
    this.primaryKey = primaryKey;
  }
  
  
}
